module.exports = (req,res,next)=>{
    let username = req.session.username;
    if(username){
        next();
    }else{
        res.redirect('/login')
    }
}